package cn.edu.hqu.exp.courseselection.web;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.SessionAttribute;
import org.springframework.web.bind.annotation.SessionAttributes;

import cn.edu.hqu.exp.courseselection.domain.ElectionForm;
import cn.edu.hqu.exp.courseselection.domain.PersonInfo;
import lombok.extern.slf4j.Slf4j;


@Slf4j
@Controller
@RequestMapping("/conclude")
public class ConcludeController {
	@GetMapping
	public String showResult(@SessionAttribute("personinfo") PersonInfo person, @SessionAttribute("electionform") ElectionForm course,Model model) {
		System.out.println(person);
		model.addAttribute("personinfo", person);
		model.addAttribute("electionform", course);
		return "conclude"; 
	}
}
